package org.gwtEss.table;

import com.google.gwt.dom.client.Style.BorderStyle;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.DOM;
import com.google.gwt.user.client.Element;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.Widget;

public class SimpleTable extends Widget{
	Element td;
	public SimpleTable() {
		Element table = DOM.createTable();
		HTML html = new HTML("sdfdf");
		table.getStyle().setBorderWidth(1, Unit.PX);
		table.getStyle().setBorderColor("black");
		table.getStyle().setBorderStyle(BorderStyle.DASHED);
		
		Element tr = DOM.createTR();
		td = DOM.createTD(); 
		tr.appendChild(td);
		table.appendChild(tr);
		td.appendChild(html.getElement());
		setElement(table);
	}
	public int getTdPxWidth(){
		return td.getOffsetWidth();
	}
}
